import request, { headers } from '@/utils/request'

export default {
  triggers(connName, namespace,tablePrefix) { return request.get('/quartz/triggers', { params: { connName, ...namespace,tablePrefix}}) },
  editJob(connName, editJobParam) { return request.post(`/quartz/${connName}/editJob`, editJobParam, headers.json) },
  trigger(connName,namespace, triggerKey, classloaderName) { return request.get('/quartz/trigger', { params: { connName,...namespace, ...triggerKey, classloaderName }}) },
  pause(connName,namespace, triggerKey, classloaderName) { return request.get('/quartz/pause', { params: { connName,...namespace, ...triggerKey, classloaderName }}) },
  resume(connName,namespace, triggerKey, classloaderName) { return request.get('/quartz/resume', { params: { connName,...namespace, ...triggerKey, classloaderName }}) },
  remove(connName,namespace, triggerName, triggerGroup, jobName, jobGroup) { return request.get('/quartz/remove', { params: { connName,...namespace, triggerName, triggerGroup, jobName, jobGroup }}) }
}
